package com.moter.demo01.io.in_outputstream.filterstream.datastream;

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;

public class DataInputStreamDemo {
    public static void main(String[] args) throws IOException {
        DataInputStream dataInputStream = new DataInputStream(new FileInputStream("src\\main\\java\\com\\moter\\demo01\\io\\in_outputstream\\filterstream\\datastream\\data.txt"));
        char c[] = new char[10];
        int len=0;
        while((c[len]=dataInputStream.readChar())!='\t'){
            len++;
        }
        System.out.println(new String(c));
        int age = dataInputStream.readInt();
        System.out.println(age);
        boolean sex = dataInputStream.readBoolean();
        System.out.println(sex);
        System.out.println(sex==true?"男":"女");

    }
}
